<template>
	<view class="tag_item" @click="delTag(data.id)">
		<text class="text">{{data.name}}</text>
		<text class="close iconfont">&#xe606;</text>
	</view>
</template>

<script setup>const emit = defineEmits(['delTag'])
const item = defineProps({	data: {		type: Object,		default: () => {}	}})const delTag = (id) =>{ // 点击删除	emit('delTag',id)} 
</script>

<style lang="less" scoped>
	.tag_item {
		position: relative;
		display: flex;
		flex-direction: row;
		padding: 10rpx 20rpx;

		// background-color: red;
		.close {
			color: #333;
			font-size: 30rpx;
			position: absolute;
			right: 8rpx;
			top: 0;
			background-color: #f7931e;
			border-radius: 50%;
		}

		.text {
			color: #333;
			font-size: 30rpx;
			padding: 8rpx 16rpx;
			border-radius: 10rpx;
			background-color: #f7931e;
		}
	}
</style>